#!/bin/bash
# By HamedAp 
# Dozdi Nakon Lanati :) Adam Bash .

sudo adduser $1  --shell /usr/sbin/nologin --force-badname&
wait

sudo passwd $1 <<!
$2
$2
!


FILE=/etc/ocserv/ocpasswd
if test -f "$FILE"; then
    sudo ocpasswd -c /etc/ocserv/ocpasswd $1 <<< $2
fi
